<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>战斗，爽！</title>
    <style>
        body {
            background: url('https://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1&mkt=en-US') no-repeat center center fixed;
            background-size: cover;
        }
        #randomNumber, #randomText {
            font-size: 2em;
            color: rgba(0, 0, 0, 0.5);
        }
        #specialText {
            display: inline;
            margin-left: 10px;
        }
    </style>
</head>
<body>
    <button onclick="generateRandomNumbers()">战斗，爽！</button><span id="specialText"></span>
    <p id="randomNumber"></p>
    <p id="randomText"></p>

    <script>
        function generateRandomNumbers() {
            var weapons1 = ["塔利亚之剑", "火焰炽拳", "黑暗统治者", "黑暗统治者", "宙斯盾骑士", "血色百合", "狂野精灵", "光辉之角"];
            var weapons2 = ["双重灵魂", "雷霆利齿", "预言舞姬", "凤舞者", "邪恶女巫", "元素克星", "魔导之魂", "法外狂徒"];

            var index1 = Math.floor(Math.random() * 8);
            var index2 = Math.floor(Math.random() * 8);

            var randomText = Math.random() < 0.2 ? "双强攻，爽！" : "正常玩，哎！";
            document.getElementById("randomText").innerHTML = randomText;

            if (randomText === "双强攻，爽！") {
                while (index1 === index2) {
                    index2 = Math.floor(Math.random() * 8);
                }
                var weapon1 = weapons2[index1];
                var weapon2 = weapons2[index2];
            } else {
                var weapon1 = weapons1[index1];
                var weapon2 = weapons2[index2];
            }

            document.getElementById("randomNumber").innerHTML = weapon1 + ' + ' + weapon2;

            var specialText = "";
            if (weapon1 === "黑暗统治者" && ["双重灵魂", "雷霆利齿", "预言舞姬", "凤舞者", "邪恶女巫"].includes(weapon2)) {
                specialText = "卧槽，这把不是随便打？";
            } else if (weapon1 === "塔利亚之剑" && weapon2 === "凤舞者") {
                specialText = "经典组合了属于是";
            } else if (weapon1 === "黑暗统治者" && ["双重灵魂", "雷霆利齿", "预言舞姬", "凤舞者", "邪恶女巫"].includes(weapon2)) {
                specialText = "这把稳了！";
            } else if (randomText === "双强攻，爽！爽！爽！爽！") {
                specialText = "该听天由命了！";
            }
            document.getElementById("specialText").innerHTML = specialText;
        }
    </script>
</body>
</html>
